<?php

/**
 * SyllabusI18n form base class.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class BaseSyllabusI18nForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                        => new sfWidgetFormInputHidden(),
      'culture'                   => new sfWidgetFormInputHidden(),
      'sylla_lession_name'        => new sfWidgetFormInput(),
      'sylla_lession_description' => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id'                        => new sfValidatorPropelChoice(array('model' => 'Syllabus', 'column' => 'id', 'required' => false)),
      'culture'                   => new sfValidatorPropelChoice(array('model' => 'SyllabusI18n', 'column' => 'culture', 'required' => false)),
      'sylla_lession_name'        => new sfValidatorString(array('max_length' => 90)),
      'sylla_lession_description' => new sfValidatorString(),
    ));

    $this->widgetSchema->setNameFormat('syllabus_i18n[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SyllabusI18n';
  }


}
